package com.hs.sfzy.controller;

import com.hs.sfzy.entity.Carousel;
import com.hs.sfzy.service.CarouselService;
import com.hs.sfzy.until.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/carousel")
public class CarouselController {
    @Autowired
    private CarouselService carouselService;
    @GetMapping
    private R selectAllCarousel(){
        List<Carousel> carousels = carouselService.selectAllCarousel();
        return R.ok(carousels);
    }
}
